package com.lmiot.xyclick.Service;

import android.service.quicksettings.TileService;
import com.lmiot.xyclick.App.MyApp;
import com.lmiot.xyclick.Util.LayoutDialogUtil;
import com.xiaoyi.intentsdklibrary.SDK.Action.ActionNormalSDK;

public class MyTileService extends TileService {
    final String LOG_TAG = "MyTileService00";

    public void onTileAdded() {
        getQsTile().setState(2);
    }

    public void onTileRemoved() {
        try {
            getQsTile().setState(2);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void onClick() {
        getQsTile().setState(2);
        ActionNormalSDK.getInstance().closeNotification(MyApp.getContext());
        LayoutDialogUtil.showAutoList(MyApp.getContext());
    }

    public void onStartListening() {
        getQsTile().setState(2);
    }

    public void onStopListening() {
        getQsTile().setState(2);
    }
}
